home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / Pac Man.swf / scripts / frame_17 / DoAction_3.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  15.7 KB  |  693 lines

  1. if(stop eq "0")
  2. {
  3.    Q = "0";
  4.    while(q < "4")
  5.    {
  6.       q += "1";
  7.       gostx = getProperty("/gost" add q, _X);
  8.       gosty = getProperty("/gost" add q, _Y);
  9.       if(gostx eq "150" and gosty eq "40")
  10.       {
  11.          set("go" add q,"0101");
  12.       }
  13.       else if(gostx eq "200" and gosty eq "40")
  14.       {
  15.          set("go" add q,"0111");
  16.       }
  17.       else if(gostx eq "260" and gosty eq "40")
  18.       {
  19.          set("go" add q,"0110");
  20.       }
  21.       else if(gostx eq "290" and gosty eq "40")
  22.       {
  23.          set("go" add q,"0101");
  24.       }
  25.       else if(gostx eq "350" and gosty eq "40")
  26.       {
  27.          set("go" add q,"0111");
  28.       }
  29.       else if(gostx eq "400" and gosty eq "40")
  30.       {
  31.          set("go" add q,"0110");
  32.       }
  33.       else if(gostx eq "150" and gosty eq "80")
  34.       {
  35.          set("go" add q,"1101");
  36.       }
  37.       else if(gostx eq "200" and gosty eq "80")
  38.       {
  39.          set("go" add q,"1111");
  40.       }
  41.       else if(gostx eq "230" and gosty eq "80")
  42.       {
  43.          set("go" add q,"0111");
  44.       }
  45.       else if(gostx eq "260" and gosty eq "80")
  46.       {
  47.          set("go" add q,"1011");
  48.       }
  49.       else if(gostx eq "290" and gosty eq "80")
  50.       {
  51.          set("go" add q,"1011");
  52.       }
  53.       else if(gostx eq "320" and gosty eq "80")
  54.       {
  55.          set("go" add q,"0111");
  56.       }
  57.       else if(gostx eq "350" and gosty eq "80")
  58.       {
  59.          set("go" add q,"1111");
  60.       }
  61.       else if(gostx eq "400" and gosty eq "80")
  62.       {
  63.          set("go" add q,"1110");
  64.       }
  65.       else if(gostx eq "150" and gosty eq "110")
  66.       {
  67.          set("go" add q,"1001");
  68.       }
  69.       else if(gostx eq "200" and gosty eq "110")
  70.       {
  71.          set("go" add q,"1110");
  72.       }
  73.       else if(gostx eq "230" and gosty eq "110")
  74.       {
  75.          set("go" add q,"1001");
  76.       }
  77.       else if(gostx eq "260" and gosty eq "110")
  78.       {
  79.          set("go" add q,"0110");
  80.       }
  81.       else if(gostx eq "290" and gosty eq "110")
  82.       {
  83.          set("go" add q,"0101");
  84.       }
  85.       else if(gostx eq "320" and gosty eq "110")
  86.       {
  87.          set("go" add q,"1010");
  88.       }
  89.       else if(gostx eq "350" and gosty eq "110")
  90.       {
  91.          set("go" add q,"1101");
  92.       }
  93.       else if(gostx eq "400" and gosty eq "110")
  94.       {
  95.          set("go" add q,"1010");
  96.       }
  97.       else if(gostx eq "230" and gosty eq "140")
  98.       {
  99.          set("go" add q,"0101");
  100.       }
  101.       else if(gostx eq "260" and gosty eq "140")
  102.       {
  103.          set("go" add q,"1011");
  104.       }
  105.       else if(gostx eq "290" and gosty eq "140")
  106.       {
  107.          set("go" add q,"1011");
  108.       }
  109.       else if(gostx eq "320" and gosty eq "140")
  110.       {
  111.          set("go" add q,"0110");
  112.       }
  113.       else if(gostx eq "140" and gosty eq "170")
  114.       {
  115.          setProperty("/gost" add q, _X, "400");
  116.          setProperty("/gost" add q, _Y, "170");
  117.          set("go" add q,"0011");
  118.       }
  119.       else if(gostx eq "200" and gosty eq "170")
  120.       {
  121.          set("go" add q,"1111");
  122.       }
  123.       else if(gostx eq "230" and gosty eq "170")
  124.       {
  125.          set("go" add q,"1110");
  126.       }
  127.       else if(gostx eq "320" and gosty eq "170")
  128.       {
  129.          set("go" add q,"1101");
  130.       }
  131.       else if(gostx eq "350" and gosty eq "170")
  132.       {
  133.          set("go" add q,"1111");
  134.       }
  135.       else if(gostx eq "410" and gosty eq "170")
  136.       {
  137.          set("go" add q,"0011");
  138.          setProperty("/gost" add q, _X, "150");
  139.          setProperty("/gost" add q, _Y, "170");
  140.       }
  141.       else if(gostx eq "230" and gosty eq "200")
  142.       {
  143.          set("go" add q,"1101");
  144.       }
  145.       else if(gostx eq "320" and gosty eq "200")
  146.       {
  147.          set("go" add q,"1110");
  148.       }
  149.       else if(gostx eq "200" and gosty eq "230")
  150.       {
  151.          set("go" add q,"1111");
  152.       }
  153.       else if(gostx eq "230" and gosty eq "230")
  154.       {
  155.          set("go" add q,"1011");
  156.       }
  157.       else if(gostx eq "260" and gosty eq "230")
  158.       {
  159.          set("go" add q,"0110");
  160.       }
  161.       else if(gostx eq "290" and gosty eq "230")
  162.       {
  163.          set("go" add q,"0101");
  164.       }
  165.       else if(gostx eq "320" and gosty eq "230")
  166.       {
  167.          set("go" add q,"1011");
  168.       }
  169.       else if(gostx eq "350" and gosty eq "230")
  170.       {
  171.          set("go" add q,"1111");
  172.       }
  173.       else if(gostx eq "400" and gosty eq "230")
  174.       {
  175.          set("go" add q,"0110");
  176.       }
  177.       else if(gostx eq "150" and gosty eq "230")
  178.       {
  179.          set("go" add q,"0101");
  180.       }
  181.       else if(gostx eq "150" and gosty eq "260")
  182.       {
  183.          set("go" add q,"1001");
  184.       }
  185.       else if(gostx eq "170" and gosty eq "260")
  186.       {
  187.          set("go" add q,"0110");
  188.       }
  189.       else if(gostx eq "200" and gosty eq "260")
  190.       {
  191.          set("go" add q,"1101");
  192.       }
  193.       else if(gostx eq "230" and gosty eq "260")
  194.       {
  195.          set("go" add q,"0111");
  196.       }
  197.       else if(gostx eq "260" and gosty eq "260")
  198.       {
  199.          set("go" add q,"1011");
  200.       }
  201.       else if(gostx eq "290" and gosty eq "260")
  202.       {
  203.          set("go" add q,"1011");
  204.       }
  205.       else if(gostx eq "320" and gosty eq "260")
  206.       {
  207.          set("go" add q,"0111");
  208.       }
  209.       else if(gostx eq "350" and gosty eq "260")
  210.       {
  211.          set("go" add q,"1110");
  212.       }
  213.       else if(gostx eq "380" and gosty eq "260")
  214.       {
  215.          set("go" add q,"0101");
  216.       }
  217.       else if(gostx eq "400" and gosty eq "260")
  218.       {
  219.          set("go" add q,"1010");
  220.       }
  221.       else if(gostx eq "150" and gosty eq "290")
  222.       {
  223.          set("go" add q,"0101");
  224.       }
  225.       else if(gostx eq "170" and gosty eq "290")
  226.       {
  227.          set("go" add q,"1011");
  228.       }
  229.       else if(gostx eq "200" and gosty eq "290")
  230.       {
  231.          set("go" add q,"1010");
  232.       }
  233.       else if(gostx eq "230" and gosty eq "290")
  234.       {
  235.          set("go" add q,"1001");
  236.       }
  237.       else if(gostx eq "260" and gosty eq "290")
  238.       {
  239.          set("go" add q,"0110");
  240.       }
  241.       else if(gostx eq "290" and gosty eq "290")
  242.       {
  243.          set("go" add q,"0101");
  244.       }
  245.       else if(gostx eq "320" and gosty eq "290")
  246.       {
  247.          set("go" add q,"1010");
  248.       }
  249.       else if(gostx eq "350" and gosty eq "290")
  250.       {
  251.          set("go" add q,"1001");
  252.       }
  253.       else if(gostx eq "380" and gosty eq "290")
  254.       {
  255.          set("go" add q,"1011");
  256.       }
  257.       else if(gostx eq "400" and gosty eq "290")
  258.       {
  259.          set("go" add q,"0110");
  260.       }
  261.       else if(gostx eq "150" and gosty eq "320")
  262.       {
  263.          set("go" add q,"1001");
  264.       }
  265.       else if(gostx eq "260" and gosty eq "320")
  266.       {
  267.          set("go" add q,"1011");
  268.       }
  269.       else if(gostx eq "290" and gosty eq "320")
  270.       {
  271.          set("go" add q,"1011");
  272.       }
  273.       else if(gostx eq "400" and gosty eq "320")
  274.       {
  275.          set("go" add q,"1010");
  276.       }
  277.       else if(gostx eq "250" and gosty eq "160")
  278.       {
  279.          r = random("2");
  280.          if(eval("munch" add q) eq "1")
  281.          {
  282.             set("munch" add q,"0");
  283.          }
  284.          else if(r eq "0")
  285.          {
  286.             call("down" add q);
  287.          }
  288.          else if(r eq "1")
  289.          {
  290.             call("right" add q);
  291.          }
  292.       }
  293.       else if(gostx eq "280" and gosty eq "160")
  294.       {
  295.          if(eval("munch" add q) eq "1")
  296.          {
  297.             tellTarget("/gost" add q)
  298.             {
  299.                gotoAndStop(1);
  300.             }
  301.             set("munch" add q,"0");
  302.          }
  303.          r = random("3");
  304.          if(r eq "0")
  305.          {
  306.             call("left" add q);
  307.          }
  308.          else if(r eq "1")
  309.          {
  310.             call("right" add q);
  311.          }
  312.          else if(r eq "2")
  313.          {
  314.             call("up" add q);
  315.          }
  316.       }
  317.       else if(gostx eq "270" and gosty eq "160")
  318.       {
  319.          if(eval("munch" add q) eq "1")
  320.          {
  321.             tellTarget("/gost" add q)
  322.             {
  323.                gotoAndStop(1);
  324.             }
  325.             set("munch" add q,"0");
  326.          }
  327.          r = random("3");
  328.          if(r eq "0")
  329.          {
  330.             call("left" add q);
  331.          }
  332.          else if(r eq "1")
  333.          {
  334.             call("right" add q);
  335.          }
  336.          else if(r eq "2")
  337.          {
  338.             call("up" add q);
  339.          }
  340.       }
  341.       else if(gostx eq "300" and gosty eq "160")
  342.       {
  343.          r = random("2");
  344.          if(r eq "0")
  345.          {
  346.             call("down" add q);
  347.          }
  348.          else if(r eq "1")
  349.          {
  350.             call("left" add q);
  351.          }
  352.       }
  353.       else if(gostx eq "250" and gosty eq "180")
  354.       {
  355.          r = random("2");
  356.          if(r eq "0")
  357.          {
  358.             call("up" add q);
  359.          }
  360.          else if(r eq "1")
  361.          {
  362.             call("right" add q);
  363.          }
  364.       }
  365.       else if(gostx eq "300" and gosty eq "180")
  366.       {
  367.          r = random("2");
  368.          if(r eq "0")
  369.          {
  370.             call("up" add q);
  371.          }
  372.          else if(r eq "1")
  373.          {
  374.             call("left" add q);
  375.          }
  376.       }
  377.       else if(gostx eq "270" and gosty eq "140")
  378.       {
  379.          r = random("2");
  380.          if(eval("munch" add q) eq "1")
  381.          {
  382.             call("down" add q);
  383.          }
  384.          else if(r eq "0")
  385.          {
  386.             call("left" add q);
  387.          }
  388.          else if(r eq "1")
  389.          {
  390.             call("right" add q);
  391.          }
  392.       }
  393.       else if(gostx eq "280" and gosty eq "140")
  394.       {
  395.          r = random("2");
  396.          if(eval("munch" add q) eq "1")
  397.          {
  398.             call("down" add q);
  399.          }
  400.          else if(r eq "0")
  401.          {
  402.             call("left" add q);
  403.          }
  404.          else if(r eq "1")
  405.          {
  406.             call("right" add q);
  407.          }
  408.       }
  409.       if(eval("munch" add q) eq "0")
  410.       {
  411.          set("seek" add q,"0");
  412.       }
  413.       else if(eval("munch" add q) eq "1")
  414.       {
  415.          set("seek" add q,"1");
  416.       }
  417.       else if(eval("munch" add q) eq "2")
  418.       {
  419.          set("seek" add q,"2");
  420.       }
  421.       if(eval("seek" add q) eq "0")
  422.       {
  423.          targetx = dotx;
  424.          targety = doty;
  425.       }
  426.       else if(eval("seek" add q) eq "1")
  427.       {
  428.          targetx = "270";
  429.          targety = "170";
  430.       }
  431.       else if(eval("seek" add q) eq "2")
  432.       {
  433.          targetx = "270";
  434.          targety = "170";
  435.       }
  436.       jump = random("2");
  437.       if(jump eq "0")
  438.       {
  439.          if(targetx < gostx)
  440.          {
  441.             fart = "11111111111";
  442.             ran = "2";
  443.          }
  444.          else if(gostx < targetx)
  445.          {
  446.             ran = "3";
  447.          }
  448.          else if(gostx == targetx)
  449.          {
  450.             fart = "222222";
  451.             if(targety < gosty)
  452.             {
  453.                ran = "0";
  454.             }
  455.             else if(gosty < targety)
  456.             {
  457.                ran = "1";
  458.             }
  459.          }
  460.       }
  461.       if(jump eq "1")
  462.       {
  463.          if(targety < gosty)
  464.          {
  465.             fart = "3333333333";
  466.             ran = "0";
  467.          }
  468.          else if(gosty < targety)
  469.          {
  470.             ran = "1";
  471.          }
  472.          else if(gosty == targety)
  473.          {
  474.             if(targetx < gostx)
  475.             {
  476.                fart = "4444444444";
  477.                ran = "2";
  478.             }
  479.             else if(gostx < targetx)
  480.             {
  481.                ran = "3";
  482.             }
  483.          }
  484.       }
  485.       if(eval("go" add q) eq "0101")
  486.       {
  487.          if(ran == "0")
  488.          {
  489.             call("right" add q);
  490.          }
  491.          else if(ran == "1")
  492.          {
  493.             call("down" add q);
  494.          }
  495.          else if(ran == "2")
  496.          {
  497.             call("down" add q);
  498.          }
  499.          else if(ran == "3")
  500.          {
  501.             call("right" add q);
  502.          }
  503.       }
  504.       else if(eval("go" add q) eq "0111")
  505.       {
  506.          if(ran == "0")
  507.          {
  508.             call("left" add q);
  509.          }
  510.          else if(ran == "1")
  511.          {
  512.             call("down" add q);
  513.          }
  514.          else if(ran == "2")
  515.          {
  516.             call("left" add q);
  517.          }
  518.          else if(ran == "3")
  519.          {
  520.             call("right" add q);
  521.          }
  522.       }
  523.       else if(eval("go" add q) eq "0110")
  524.       {
  525.          if(ran == "0")
  526.          {
  527.             call("left" add q);
  528.          }
  529.          else if(ran == "1")
  530.          {
  531.             call("down" add q);
  532.          }
  533.          else if(ran == "2")
  534.          {
  535.             call("left" add q);
  536.          }
  537.          else if(ran == "3")
  538.          {
  539.             call("down" add q);
  540.          }
  541.       }
  542.       else if(eval("go" add q) eq "1111")
  543.       {
  544.          if(ran == "0")
  545.          {
  546.             call("up" add q);
  547.          }
  548.          else if(ran == "1")
  549.          {
  550.             call("down" add q);
  551.          }
  552.          else if(ran == "2")
  553.          {
  554.             call("left" add q);
  555.          }
  556.          else if(ran == "3")
  557.          {
  558.             call("right" add q);
  559.          }
  560.       }
  561.       else if(eval("go" add q) eq "1011")
  562.       {
  563.          if(ran == "0")
  564.          {
  565.             call("up" add q);
  566.          }
  567.          else if(ran == "1")
  568.          {
  569.             call("right" add q);
  570.          }
  571.          else if(ran == "2")
  572.          {
  573.             call("left" add q);
  574.          }
  575.          else if(ran == "3")
  576.          {
  577.             call("right" add q);
  578.          }
  579.       }
  580.       else if(eval("go" add q) eq "1001")
  581.       {
  582.          if(ran == "0")
  583.          {
  584.             call("up" add q);
  585.          }
  586.          else if(ran == "1")
  587.          {
  588.             call("right" add q);
  589.          }
  590.          else if(ran == "2")
  591.          {
  592.             call("up" add q);
  593.          }
  594.          else if(ran == "3")
  595.          {
  596.             call("right" add q);
  597.          }
  598.       }
  599.       else if(eval("go" add q) eq "1010")
  600.       {
  601.          if(ran == "0")
  602.          {
  603.             call("up" add q);
  604.          }
  605.          else if(ran == "1")
  606.          {
  607.             call("left" add q);
  608.          }
  609.          else if(ran == "2")
  610.          {
  611.             call("left" add q);
  612.          }
  613.          else if(ran == "3")
  614.          {
  615.             call("up" add q);
  616.          }
  617.       }
  618.       else if(eval("go" add q) eq "0011")
  619.       {
  620.          if(ran == "0")
  621.          {
  622.             call("right" add q);
  623.          }
  624.          else if(ran == "1")
  625.          {
  626.             call("left" add q);
  627.          }
  628.          else if(ran == "2")
  629.          {
  630.             call("left" add q);
  631.          }
  632.          else if(ran == "3")
  633.          {
  634.             call("right" add q);
  635.          }
  636.       }
  637.       else if(eval("go" add q) eq "1110")
  638.       {
  639.          if(ran == "0")
  640.          {
  641.             call("up" add q);
  642.          }
  643.          else if(ran == "1")
  644.          {
  645.             call("down" add q);
  646.          }
  647.          else if(ran == "2")
  648.          {
  649.             call("left" add q);
  650.          }
  651.          else if(ran == "3")
  652.          {
  653.             call("down" add q);
  654.          }
  655.       }
  656.       else if(eval("go" add q) eq "1101")
  657.       {
  658.          if(ran == "0")
  659.          {
  660.             call("up" add q);
  661.          }
  662.          else if(ran == "1")
  663.          {
  664.             call("down" add q);
  665.          }
  666.          else if(ran == "2")
  667.          {
  668.             call("up" add q);
  669.          }
  670.          else if(ran == "3")
  671.          {
  672.             call("right" add q);
  673.          }
  674.       }
  675.       else if(eval("go" add q) eq "xxx1")
  676.       {
  677.          call(last1);
  678.       }
  679.       else if(eval("go" add q) eq "xxxx")
  680.       {
  681.          call(last2);
  682.       }
  683.       else if(eval("go" add q) eq "xxx3")
  684.       {
  685.          call(last3);
  686.       }
  687.       else if(eval("go" add q) eq "xxx4")
  688.       {
  689.          call(last4);
  690.       }
  691.    }
  692. }
  693.